﻿/**	import_ctrl.h
 *	----	Create Time Stamp	--2007-03-13 23:35:29--
 *------------------------------------------------------------------------------
 *	Mean	:DLL 等模块的导入管理器
 *	Author	:Nick Shallery	(nicknide@gmail.com)
 *	Version	:1.0.1.4	(2008-01-13 14:27:38)
 *------------------------------------------------------------------------------
**/	/*YOU HAVE ALL LEFT WITH THIS CODE WHILE YOU KEEP COMMENT IN EVERY COPY.*/

#if			!defined(__LOLIX__LOLI__IMPORT_CTRL__K_IN_G__)
#define		__LOLIX__LOLI__IMPORT_CTRL__K_IN_G__
//==============================================================================
//--------------------------------------------------------------------------

#if			!defined(__LOLIX__LOLI_X_MACRO__K_IN_G__)
	#include	"../lolix_macro.h"
#endif	//	!defined(__LOLIX__LOLI_X_MACRO__K_IN_G__)

#if			!defined(__LOLIX__LOLIX_TYPE__K_IN_G__)
	#include	"../lolix_type.h"
#endif	//	!defined(__LOLIX__LOLIX_TYPE__K_IN_G__)

#if			!defined(__LOLIX__TOY__REBIND_TYPE__K_IN_G__)
	#include	"../toy/rebind_type.hpp"
#endif	//	!defined(__LOLIX__TOY__REBIND_TYPE__K_IN_G__)

namespace lolix{
	namespace loli{
		class import_handle;
	}
}


class LOLIX_NO_VTABLE lolix::loli::import_handle
	: public lolix::itf
{
public:
	LOLIX_DEFINE_FACTORY((0x05f2dd6c, 0x48124070, 0x8bbc245b, 0xfab11d8a), (import_handle** out_ptr, const wchar_t* const inst_name));
	LOLIX_DECLARE_ITF(lolix::loli::import_handle, lolix::itf, (0x35114a48, 0x7b6f4073, 0x8ad1cbef, 0xd1ac8dac));

	class LOLIX_NO_VTABLE call_back	//	no inherit from itf
	{
	public:
		virtual	LOLIX_RETNV	LOLIX_CALL_THROWS	get_proc(LOLIX_RETNV, void* proc) = 0;
		friend import_handle;
	};

	LOLIX_INTERFACE(get_proc	, LOLIX_RETNV	, (void**, const char* const proc_name));
	LOLIX_INTERFACE(get_proc	, LOLIX_RETNV	, (const char* const proc_name, call_back* call_back));
};

SYS_REGIST_TYPE(lolix::loli::import_handle);
SYS_REGIST_TYPE(lolix::loli::import_handle::factory_type);



//--------------------------------------------------------------------------
//==============================================================================
#endif	//	!defined(__LOLIX__LOLI__IMPORT_CTRL__K_IN_G__)
